package com.wwu.system.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.wwu.common.constant.CommConst;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 定时任务日志实体
 * @author 一蓑烟雨
 * @date  2023-07-04
 * @version  1.0.0
 */
@Data
@Accessors(chain = true)
@TableName("sys_quartz_log")
@ApiModel(value="SysQuartzLog:定时任务日志实体", description="定时任务日志实体")
public class SysQuartzLog implements Serializable {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "日志id")
    @TableId(value = "record_id", type = IdType.ASSIGN_ID)
    private String recordId;

    @ApiModelProperty(value = "任务id")
    @TableField(value = "quartz_id")
    private String quartzId;

    @ApiModelProperty(value = "任务类名")
    @TableField("quartz_class")
    private String quartzClass;

    @ApiModelProperty(value = "任务配置参数")
    @TableField("quartz_param")
    private String quartzParam;

    @ApiModelProperty(value = "执行状态（0:成功；1:失败）")
    @TableField("exec_status")
    private Integer execStatus;

    @ApiModelProperty(value = "执行描述")
    @TableField("exec_desc")
    private String execDesc;

    @ApiModelProperty(value = "执行时间")
    /** 格式化后台和前端显示样式 */
    @DateTimeFormat(pattern = CommConst.DATE_TIME)
    @JsonFormat(pattern = CommConst.DATE_TIME,timezone = CommConst.TIME_ZONE)
    @TableField("exec_time")
    private LocalDateTime execTime;
}
